import { axios } from '../../utils/request'
export const baseAPI = {
  sparePartRecordChart: '/dm/spare/sparePartRecordChart', //备件大屏
  // queryMaintainChart:
  //   '/dm/maintain/queryMaintainChart?begintime=2022-10-25&endtime=2022-10-25', //维修大屏
  queryMaintainChart: '/dm/maintain/queryMaintainChart', //维修大屏
  queryProdChartDetail: '/dm/prod/queryProdChartDetail',
  queryProdChart: '/dm/prod/queryProdChart', //生产大屏
  queryBYCharts: '/dm/by/queryBYCharts', //保养大屏
  produceDuringOneWeek: '/jlt/dataScreen/produceDuringOneWeek', //佳力图生产车间大屏
  queryDataCommon: '/dm/machine/queryDataCommon?tablename=dm_machine', //佳力图生产车间大屏
}
export function queryProdChartDetail(parameter) {
  return axios({
    url: baseAPI.queryProdChartDetail,
    method: 'post',
    data: parameter,
  })
}
export function queryDataCommon(parameter) {
  return axios({
    url: baseAPI.queryDataCommon,
    method: 'post',
    data: parameter,
  })
}
export function produceDuringOneWeek(parameter) {
  return axios({
    url: baseAPI.produceDuringOneWeek,
    method: 'post',
    data: parameter,
  })
}

export function queryBYCharts(parameter) {
  return axios({
    url: baseAPI.queryBYCharts,
    method: 'post',
    data: parameter,
  })
}
export function queryProdChart(parameter) {
  return axios({
    url: baseAPI.queryProdChart,
    method: 'post',
    data: parameter,
  })
}
export function queryMaintainChart(parameter) {
  return axios({
    url: baseAPI.queryMaintainChart,
    method: 'post',
    data: parameter,
  })
}

export function sparePartRecordChart(parameter) {
  return axios({
    url: baseAPI.sparePartRecordChart,
    method: 'post',
    data: parameter,
  })
}
